package ua.vn.ticket_scanner;

import android.app.Application;
import android.widget.Toast;

import ua.vn.ticket_scanner.utils.TPreferenceManager;

/**
 * Created by Ivan on 21.06.13.
 */
public class TApplication extends Application {

    private static TApplication instance = null;

    private Toast toast;

    public static TApplication getInstance() {
        return instance;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        instance = this;
        TPreferenceManager.getInstance();
        toast = Toast.makeText(this, R.string.app_name, Toast.LENGTH_LONG);
    }

    public void showToast(int stringId) {
        toast.setText(stringId);
        toast.show();
    }
}
